<?php

namespace App\SubApps\Account\Models;

use App\SubApps\Account\Traits\ModelSetConnectionMysqlTrait;
use Hilaoyu\LaravelExtend\Extensions\Files\Traits\ModelWithFilesTrait;
use Hilaoyu\LaravelExtend\Services\AccessControl\Traits\ModelAuthUserWithAccessControlTrait;
use Hilaoyu\LaravelExtend\Services\Auth\AbstractModelAuthUsers;
use Hilaoyu\LaravelExtend\Services\Auth\Traits\ModelUserWithAuthMultipleTokenTrait;

class AuthUsersModel extends AbstractModelAuthUsers
{
    use ModelSetConnectionMysqlTrait;
    use ModelUserWithAuthMultipleTokenTrait;
    static protected function classNameModelAuthToken(){
        return AuthTokenModel::class;
    }


    use ModelWithFilesTrait;
    protected function _getSettingImageFields():array {
        return [
            'picture'=>'avatars',
        ];
    }
    protected function _getSettingContentHasFileFields():array {
        return [
            'summary' => 'editor',
        ];
    }

    use ModelAuthUserWithAccessControlTrait;

    //accesses
    protected static function classNameModelAccessControlSuperusers()
    {
        return AccessControlSuperusersModel::class;
    }

    protected static function classNameModelAccessControlUsersRoles()
    {
        return AccessControlRolesModel::class;
    }

    protected static function classNameModelAccessControlUsersRolesRelation()
    {
        return AccessControlUsersRolesRelationModel::class;
    }
}
